package o;

import android.os.AsyncTask;

public class eaw extends Thread {
    private c ˊ;
    private String ˏ = "";

    public enum c {
        COMMAND_CANCLE_DOWNLOADING_TASK,
        COMMAND_CHK_3RD_INSTALL_APP_UPDATE
    }

    public eaw(String str, c cVar) {
        this.ˏ = str;
        this.ˊ = cVar;
    }

    public void run() {
        if (c.COMMAND_CANCLE_DOWNLOADING_TASK == this.ˊ) {
            String[] ˊ = dsl.ˊ(this.ˏ);
            if (ˊ != null && ˊ.length > 0) {
                for (String str : ˊ) {
                    Logger.ˎ("AppInstalledUpdateCh", "download task is old,cancel Task:" + this.ˏ + " taskId=" + str);
                    try {
                        dvt.ˏ().ॱ(Long.parseLong(str));
                    } catch (NumberFormatException e) {
                        Logger.e("AppInstalledUpdateCh", "NumberFormatException");
                    }
                }
            }
        } else if (c.COMMAND_CHK_3RD_INSTALL_APP_UPDATE == this.ˊ && ebc.ˊ().ˎ() && dug.ˋ()) {
            dsi.ˏ(new AsyncTask(this) {
                final /* synthetic */ eaw ˋ;

                {
                    this.ˋ = r1;
                }

                protected Object doInBackground(Object[] objArr) {
                    this.ˋ.ˎ();
                    return null;
                }
            });
        }
    }

    /* JADX WARNING: inconsistent code. */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    private void ˎ() {
        /*
        r7 = this;
        r4 = 0;
        r3 = 1;
        r0 = o.doq.ॱ();
        r0 = r0.ˋ();
        r0 = o.doo.ˊ(r0);
        if (r0 == 0) goto L_0x016f;
    L_0x0010:
        r0 = o.dss.ॱ();
        r1 = o.doq.ॱ();
        r1 = r1.ˋ();
        r2 = r7.ˏ;
        r2 = r0.ˎ(r1, r2, r3, r4);
        r0 = o.dss.ॱ();
        r0 = r0.ˊ();
        if (r0 == 0) goto L_0x0047;
    L_0x002c:
        r0 = "AppInstalledUpdateCh";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "Update do not disturb is open.do not show key update notify.";
        r1 = r1.append(r2);
        r2 = r7.ˏ;
        r1 = r1.append(r2);
        r1 = r1.toString();
        o.dna.ˎ(r0, r1);
    L_0x0046:
        return;
    L_0x0047:
        r0 = o.cdg.class;
        r0 = o.cdb.ॱ(r0);
        r0 = (o.cdg) r0;
        r1 = r7.ˏ;
        r0 = r0.ʼ(r1);
        if (r0 == 0) goto L_0x0072;
    L_0x0057:
        r0 = "AppInstalledUpdateCh";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "App has igonre.";
        r1 = r1.append(r2);
        r2 = r7.ˏ;
        r1 = r1.append(r2);
        r1 = r1.toString();
        o.dna.ˎ(r0, r1);
        goto L_0x0046;
    L_0x0072:
        if (r2 == 0) goto L_0x0153;
    L_0x0074:
        r0 = o.cdg.class;
        r0 = o.cdb.ॱ(r0);
        r0 = (o.cdg) r0;
        r1 = r7.ˏ;
        r0 = r0.ˏ(r1, r3, r3);
        if (r0 == 0) goto L_0x0153;
    L_0x0084:
        r0 = r2.ˏॱ();
        if (r0 != 0) goto L_0x0137;
    L_0x008a:
        r0 = o.ebo.ॱ();
        r1 = r2.ᐝ();
        r3 = r2.ʿ();
        r0 = r0.ˏ(r1, r3);
        r0 = r0.size();
        if (r0 <= 0) goto L_0x00bb;
    L_0x00a0:
        r0 = "AppInstalledUpdateCh";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "this app has show keyappupdate notification! so can not show again! packgeName:";
        r1 = r1.append(r2);
        r2 = r7.ˏ;
        r1 = r1.append(r2);
        r1 = r1.toString();
        o.dna.ˎ(r0, r1);
        goto L_0x0046;
    L_0x00bb:
        r0 = 0;
        r1 = o.doq.ॱ();	 Catch:{ OutOfMemoryError -> 0x00fd, Exception -> 0x0106 }
        r1 = r1.ˋ();	 Catch:{ OutOfMemoryError -> 0x00fd, Exception -> 0x0106 }
        r1 = r1.getPackageManager();	 Catch:{ OutOfMemoryError -> 0x00fd, Exception -> 0x0106 }
        r3 = r7.ˏ;	 Catch:{ OutOfMemoryError -> 0x00fd, Exception -> 0x0106 }
        r1 = r1.getApplicationIcon(r3);	 Catch:{ OutOfMemoryError -> 0x00fd, Exception -> 0x0106 }
        r0 = o.ern.ॱ(r1);	 Catch:{ OutOfMemoryError -> 0x00fd, Exception -> 0x0106 }
        r1 = o.doq.ॱ();	 Catch:{ OutOfMemoryError -> 0x00fd, Exception -> 0x0178 }
        r1 = r1.ˋ();	 Catch:{ OutOfMemoryError -> 0x00fd, Exception -> 0x0178 }
        r3 = 0;
        r0 = o.ern.ˏ(r1, r0, r3);	 Catch:{ OutOfMemoryError -> 0x00fd, Exception -> 0x0178 }
    L_0x00df:
        if (r0 != 0) goto L_0x0128;
    L_0x00e1:
        r0 = "AppInstalledUpdateCh";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "get icon failed,break show notification,packageName:";
        r1 = r1.append(r2);
        r2 = r7.ˏ;
        r1 = r1.append(r2);
        r1 = r1.toString();
        o.dna.ˊ(r0, r1);
        goto L_0x0046;
    L_0x00fd:
        r1 = move-exception;
        r1 = "AppInstalledUpdateCh";
        r3 = "checkAppUpdate() ";
        o.dna.ˊ(r1, r3);
        goto L_0x00df;
    L_0x0106:
        r1 = move-exception;
        r6 = r1;
        r1 = r0;
        r0 = r6;
    L_0x010a:
        r3 = "AppInstalledUpdateCh";
        r4 = new java.lang.StringBuilder;
        r4.<init>();
        r5 = "checkAppUpdate() ";
        r4 = r4.append(r5);
        r0 = r0.toString();
        r0 = r4.append(r0);
        r0 = r0.toString();
        o.dna.ˊ(r3, r0);
        r0 = r1;
        goto L_0x00df;
    L_0x0128:
        r1 = o.doq.ॱ();
        r1 = r1.ˋ();
        r3 = "AppInstalledUpdateCh";
        o.dqi.ˏ(r1, r2, r0, r3);
        goto L_0x0046;
    L_0x0137:
        r0 = "AppInstalledUpdateCh";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "app has update msg online but signature is unsame,packageName:";
        r1 = r1.append(r2);
        r2 = r7.ˏ;
        r1 = r1.append(r2);
        r1 = r1.toString();
        o.dna.ˎ(r0, r1);
        goto L_0x0046;
    L_0x0153:
        r0 = "AppInstalledUpdateCh";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "can not get recommend update!!!";
        r1 = r1.append(r2);
        r2 = r7.ˏ;
        r1 = r1.append(r2);
        r1 = r1.toString();
        o.dna.ˎ(r0, r1);
        goto L_0x0046;
    L_0x016f:
        r0 = "AppInstalledUpdateCh";
        r1 = "do not have active netowrk.can not get update msg online.";
        o.dna.ˎ(r0, r1);
        goto L_0x0046;
    L_0x0178:
        r1 = move-exception;
        r6 = r1;
        r1 = r0;
        r0 = r6;
        goto L_0x010a;
        */
        throw new UnsupportedOperationException("Method not decompiled: o.eaw.ˎ():void");
    }
}
